<?php
require_once 'dao/AbstractDAO.php';

class ObserverUpdateObjectDAO extends AbstractDAO{
	private static $TABLE = "OBSERVER_UPDATE_OBJECT";
	
	public function insertObserverUpdateObject($clientId, $observerUpdateDataId){
		$values = array();
		$values["CLIENT_ID"] = $clientId;
		$values["OBSERVER_UPDATE_DATA_ID"] = $observerUpdateDataId;
		$values["UPDATE_YN"] = "N";
		
		return $this->insert(ObserverUpdateObjectDAO::$TABLE, $values);
	}
	
	public function updateObserverUpdateObjectUpdateYn($clientId, $observerUpdateDataId, $updateYn){
		$updateDatas = array();
		$updateDatas["UPDATE_YN"] = $updateYn;
		return $this->update(ObserverUpdateObjectDAO::$TABLE, $updateDatas, "OBSERVER_UPDATE_DATA_ID = $observerUpdateDataId");
	}
	
	public function selectObserverUpdateObjectList($clientId){
		return $this->selectList(ObserverUpdateObjectDAO::$TABLE, "*", "CLIENT_ID = '$clientId' AND UPDATE_YN = 'N'");
	}
}
?>